/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hoja7bst;

import structure5.Hashtable;

/**
 *
 * @author Vinicio Gomez
 */
class WordHashtable implements WordSet {
    Hashtable<String,String> tree;
    public WordHashtable() {
        tree = new Hashtable<String, String>();
    }

    @Override
    public void add(Word wordObject) {
        tree.put(wordObject.getWord(), wordObject.getType());
    }

    @Override
    public Word get(Word word) {
        if (tree.get(word.getWord())==null){
            return null;
        }
        else{
            return new Word (word.getWord(),tree.get(word.getWord()));
        }
        
    }
    
}
